<template>
  <div>
    <el-table :data="deptList" height="250" border style="width: 100%">
      <el-table-column prop="id" label="编号" width="180"> </el-table-column>
      <el-table-column prop="deptName" label="名称" width="180"> </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
        deptList:[]
    };
  },
  methods: {
    selAllDept(){
        this.$axios.post("dept/").then(res=>{
            this.deptList = res.data.data.list;
        })
    }
  },
  mounted() {
    this.selAllDept();
  },
};
</script>